{% extends theme('base.html') %}

{% block content %}
<h3>Edit Example</h3>
<form id="edit-example" class="well form-horizontal"
  action="{{url_for('ExampleBP.edit_example', example_id=example.key.id())}}" method="post" accept-charset="utf-8">
  <fieldset>
    {{form.hidden_tag()}}
    <input type="hidden" name="mode" value="edit" />
    <div class="control-group">
      <div class="control-label">{{form.example_name.label}}</div>
      <div class="controls">
        {{form.example_name|safe}}
        {% if form.example_name.errors %}
        <ul class="errors">
          {% for error in form.example_name.errors %}
          <li>{{error}}</li>
          {% endfor %}
        </ul>
        {% endif %}
      </div>
    </div>
    <div class="control-group">
      <div class="control-label">{{form.example_description.label}}</div>
      <div class="controls">
        {{form.example_description|safe}}
        {% if form.example_description.errors %}
        <ul class="errors">
          {% for error in form.example_description.errors %}
          <li>{{error}}</li>
          {% endfor %}
        </ul>
        {% endif %}
      </div>
    </div>
    <div class="control-group">
      <div class="controls">
        <input class="btn btn-primary" type="submit" value="Save Changes"/>
        <a class="btn cancel" href="{{url_for('ExampleBP.list_examples')}}">Cancel</a>
      </div>
    </div>
  </fieldset>
</form>
{% endblock content %}
